{% extends "base_general.html" %}

{% block extrahead %}
<script type="text/javascript" src="/static/js/jquery.dimensions.pack.js"></script>
  <script type="text/javascript" src="/static/js/jquery.date_input.pack.js"></script>
<script type="text/javascript" src="/static/js/jquery.date_input.es_ES.js'"></script>

  <link rel="stylesheet" href="/static/js/date_input.css" type="text/css">
  

{% endblock %}


{% block jquery %}
<script type="text/javascript">

jQuery.extend(DateInput.DEFAULT_OPTS, {
  month_names: ["Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"],
  short_month_names: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"],
  short_day_names: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sab"]
});

$.extend(DateInput.DEFAULT_OPTS, {
  stringToDate: function(string) {
    var matches;
    if (matches = string.match(/^(\d{4,4})-(\d{2,2})-(\d{2,2})$/)) {
      return new Date(matches[1], matches[2] - 1, matches[3]);
    } else {
      return null;
    };
  },

  dateToString: function(date) {
    var month = (date.getMonth() + 1).toString();
    var dom = date.getDate().toString();
    if (month.length == 1) month = "0" + month;
    if (dom.length == 1) dom = "0" + dom;
    return date.getFullYear() + "-" + month + "-" + dom;
  }
});


$(function() {
  $("#id_fecha_vencimiento").date_input();
});
</script>
{% endblock jquery%}


{% block left %}

<h2>Consorcio "{{ consorcio.nombre }}" - Balance {{ balance.fecha_vencimiento|date:"F \de Y" }}</h2>


<form action="./new" method="POST">
{{ form_balance.as_p }}
<input type="submit" value="crear" />
</form>


{% endblock left %}



{% block box %}	
{% endblock box %}	